/*********************************************************
          File Name:12.7.cpp
          Author: Abby Cin
          Mail: abbytsing@gmail.com
          Created Time: Tue 15 Sep 2015 04:46:25 PM CST
**********************************************************/

#include <iostream>
#include <memory>       // shared_ptr
#include <vector>

using type = std::shared_ptr<std::vector<int>>;

void getvi(type vi)
{
        for(int i = 0; i < 3; i++)
                vi->push_back(i);
}

void putvi(type vi)
{
        for(auto x: *vi)
                std::cout << x << " ";
        std::cout << std::endl;
}

int main()
{
        type vi = std::make_shared<std::vector<int>>();
        getvi(vi);
        putvi(vi);

        return 0;
}
